import { Role } from "src/role/entities/role.entity";
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from "typeorm";

@Entity()
export class User {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    user_name: string;

    @Column()
    user_pass: string;

    @Column()
    name: string;

    @Column()
    introduction: string;

    @Column()
    avatar: string;

    @ManyToOne(() => Role, role => role.user)
    role: Role;

}